﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace CartoGraphic.Model
{
    class Layer
    {
        public List<AbstractGeometry> geos;
        public int depth;   //图层深度
        public bool isShow = true;
        public Layer(int depth)
        {
            geos = new List<AbstractGeometry>();
            this.depth = depth;
        }

        public void draw(Graphics g)
        {
            foreach (AbstractGeometry geo in geos)
                if(geo.dimention==2)
                    geo.Draw(g);
            foreach (AbstractGeometry geo in geos)
                if (geo.dimention == 1)
                    geo.Draw(g);
            foreach (AbstractGeometry geo in geos)
                if (geo.dimention == 0)
                    geo.Draw(g);
        }
    }
}
